﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Collections;

namespace Xss.Data
{
    public interface IAdoCommander
    {

        object ExecuteScalar(string cmdText);
        object ExecuteScalar(CommandType cmdType, string cmdText, params IDbDataParameter[] parameters);

        object ExecuteNonQuery(string cmdText);
        object ExecuteNonQuery(CommandType cmdType, string cmdText, params IDbDataParameter[] parameters);

        object ExecuteReader(CommandType cmdType, string cmdText, Func<IDataReader, object> callback);
        object ExecuteReader(CommandType cmdType, string cmdText, IReaderCallback callback);

        DataTable ExecuteDataTable(string tableName, string cmdText);
        DataTable ExecuteDataTable(CommandType cmdType, string tableName, string cmdText, params IDbDataParameter[] parameters);
        DataTable ExecuteUpdate(DataTable data, string cmdText);
        DataTable ExecuteUpdate(DataTable data, CommandType cmdType, string cmdText, params IDbDataParameter[] parameters);

        DataSet ExecuteDataSet(IDictionary cmdText);
        DataSet ExecuteDataSet(IDictionary cmdText, DataSet data);

        DataSet ExecuteUpdate(DataSet data, IDictionary cmdText);

    }
}
